package com.example.smartlearning.controller;

import com.example.smartlearning.service.impl.CarouselServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@CrossOrigin//跨域
@RestController//遵循RestFul
@RequestMapping("/Smart/Carousel/")
public class CarouselController {
    @Resource
    CarouselServiceImpl carouselService;

    @GetMapping("selectImgBySort")
    private String selectImgBySort(@RequestParam("sort") String sort) {
        System.out.println(carouselService.getCarouselImg(sort));
        return carouselService.getCarouselImg(sort);
    }
}
